
#ifndef HJM_OBSERVER_HPP
#define HJM_OBSERVER_HPP

#include "HJM.hpp"
#include "Observer.hpp"

// Vanilla swap

enum ObsType { Caplet, Floorlet, ZCB, Libor, Call, Swap, Swaption };

class HJM_Observer : public ThreadedObserver {
  double vsum;
  int count;
  ObsType type;
  string m_name;
  vector<double> data;
  double m_Tf;
public:
  HJM_Observer ( HJM* p_subject, const pair<string,vector<double> >& );
  void update(int ith);
  double value();
  const string& name() const { return m_name; }
  const vector<double>& args() const { return data; }
};

#endif
